package com.vrv.app.cyberspace.common.ddio;

/**
 * @Author：LJ
 * @Description：
 * @Date: 2017/12/19
 * @Modified By:
 */
public class AccessToken {

    //机器人appID，用于多机器人区分。若只有一个。可以不使用
    private String appID;
    //accessToken 字符串
    private String tokenStr;
    //失效时间
    private long expAt;

    public String getAppID() {
        return appID;
    }
    public void setAppID(String appID) {
        this.appID = appID;
    }
    public String getTokenStr() {
        return tokenStr;
    }
    public void setTokenStr(String tokenStr) {
        this.tokenStr = tokenStr;
    }
    public long getExpAt() {
        return expAt;
    }
    public void setExpAt(long expAt) {
        this.expAt = expAt;
    }

    /**
     *
     * enable:判断accessToken是否有效. <br/>
     *
     * @author bxy-jing
     * @return
     * @since JDK 1.6
     */
    public boolean enable(){
        return System.currentTimeMillis()<expAt;
    }
}
